/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.service;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.app.dto.OrderCountData;
import com.yami.shop.bean.app.dto.ShopCartOrderMergerDto;
import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.model.OrderItem;
import com.yami.shop.bean.param.OrderParam;
import com.yami.shop.bean.param.OrderPayParam;
import com.yami.shop.bean.param.StatisticsRefundParam;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lgh on 2018/09/15.
 */
public interface StatisticsOrderService extends IService<Order> {

    /**
     * 根据店铺id获取支付数据
     * @param shopId
     */
    OrderPayParam getPayUserCountByshopId(Long shopId, Date startTime, Date endTime);

    /**
     * 根据时间和店铺id获取分段时间数据
     */
    OrderPayParam getActualTotalByHour(Long shopId, Date startTime, Date endTime);

    /**
     * 根据天数和店铺id获取分段时间数据
     */
    List<OrderPayParam> getActualTotalByDay(Long shopId, Date startTime, Date endTime);


    /**
     * 根据ID获取退款单信息
     * @param  shopId 退款商家ID
     * @return 退款信息包装对象
     */
    StatisticsRefundParam getOrderRefundByShopId(Long shopId, Date startTime, Date endTime);

    /**
     * 根据ID获取分段退款单信息
     * @param  shopId 退款商家ID
     * @return 退款信息包装对象
     */
    List<StatisticsRefundParam> getOrderRefundByShopIdAndDay(Long shopId, Date startTime, Date endTime);

    /**
     * 根据商品ID获取退款信息排行
     * @param  shopId 退款商家ID
     * @return 退款信息包装对象
     */
    List<StatisticsRefundParam> getRefundRankingByProd(Long shopId, Date beginTime, Date endTime);

    /**
     * 根据退款原因获取退款信息排行
     * @param  shopId 退款商家ID
     * @return 退款信息包装对象
     */
    List<StatisticsRefundParam> getRefundRankingByReason(Long shopId, Date beginTime, Date endTime);

}
